import request from '@/utils/request'

export async function USearch(data) {
  return request.post('/USearch', data)
}
export async function GetSession(data) {
  return request({
    url: '/GetSession',
    method: 'post',
    data,
  }).then((reqdata) => {
    const { data } = reqdata
    if (data.length == 0 || data[0].utype == 99) {
      return data
    } else {
      return USearch({ uUser: data[0].uUser })
    }
  })
}

export async function LoginOut() {
  return request.post('/LoginOut')
}
